const fs = require('fs');
function testReadFile(filename){
    return new Promise((resolve,reject)=>{
        fs.readFile(filename,'utf-8',(err,data)=>{
            err?reject(err):resolve(data)
        })
    }).catch((err)=>{
            console.log(err);
            
        })
}

async function result(){
    let r = await testReadFile('./files/a.txt');
    let r2 = await testReadFile('./files/b.txt');
    let r3 = await testReadFile('./files/c.txt');
    console.log(r);
    console.log(r2);
    console.log(r3);
    
}
result();










